export default {
  category_id: [
    { required: true, message: "商品分类不能为空", trigger: "blur" }
  ],
  group_id: [{ required: true, message: "用户分组不能为空", trigger: "blur" }],

  //   price_end: [
  //     { required: true, message: "基准价范围不能为空", trigger: "blur" },
  //     {
  //       pattern: /^[1-9]{1}[0-9]*$|^0{1}\.{1}[0-9]+$|^[1-9]{1}[0-9]*\.{1}[0-9]+$/,
  //       message: "基准价需要大于0",
  //       trigger: "blur"
  //     }
  //   ],
  price_start: [
    { required: true, message: "基准价范围不能为空", trigger: "blur" },
    {
      pattern: /^[1-9]{1}[0-9]*$|^0{1}\.{1}[0-9]+$|^[1-9]{1}[0-9]*\.{1}[0-9]+$/,
      message: "基准价需要大于0",
      trigger: "blur"
    }
  ],
  price_end: [
    { required: true, message: "基准价范围不能为空", trigger: "blur" },
    {
      pattern: /^[1-9]{1}[0-9]*$|^0{1}\.{1}[0-9]+$|^[1-9]{1}[0-9]*\.{1}[0-9]+$/,
      message: "基准价需要大于0",
      trigger: "blur"
    }
  ],

  type: [{ required: true, message: "运算方式不能为空", trigger: "blur" }],
  price: [
    { required: true, message: "（因）加数不能为空", trigger: "blur" },
    {
      pattern: /^[1-9]{1}[0-9]*$|^0{1}\.{1}[0-9]+$|^[1-9]{1}[0-9]*\.{1}[0-9]+$/,
      message: "（因）加数需要大于0",
      trigger: "blur"
    }
  ]
};
